<?php
namespace app\admin\model;

class System extends \think\Model {

    public function setBannelAttr($val){
        return implode(',', $val);
    }
    public function setRegStartTimeAttr($val){
        return strtotime($val);
    }
    public function setRegEndTimeAttr($val){
        return strtotime($val);
    }

    public function getBannelArrAttr($val, $data){
        return explode(',', $data['bannel']);
    }
    public function getRegStartTimeStrAttr($val, $data){
        return date('Y-m-d', $data['reg_start_time']);
    }
    public function getRegEndTimeStrAttr($val, $data){
        return date('Y-m-d', $data['reg_end_time']);
    }

}